package com.hushao.lims.weblims.service;

import com.hushao.lims.weblims.domain.TeacherInfo;
import org.apache.poi.ss.usermodel.Sheet;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.Map;

/**
 * @author 930588706
 * @date 18/1/15
 * 教师服务接口
 */
public interface TeacherService {
    /**
     * 根据姓名模糊查询教师集合(分页)
     * @param teacherName
     * @param pageable
     * @return
     */
    Page<TeacherInfo> listByName(String teacherName, Pageable pageable);

    /**
     * 根据Id查询教师
     * @param teacherId
     * @return
     */
    TeacherInfo getById(Integer teacherId);

    /**
     * 增加或修改教师信息
     * @param teacher
     * @param departmentName
     * @return
     * @throws Exception
     */
    String saveOrUpdate(TeacherInfo teacher, String departmentName)throws Exception;

    /**
     * 删除教师
     * @param teacherId
     * @throws Exception
     */
    void remove(Integer teacherId)throws Exception;

    /**
     * 教师授权
     * @param teacher
     * @param roleIds
     * @throws Exception
     */
    void authority(TeacherInfo teacher, Integer[] roleIds)throws Exception;

    /**
     * 上传excel文件
     * @param sheetAt
     * @throws Exception
     */
    void uploadFile(Sheet sheetAt)throws Exception;

    /**
     * 课程
     * @param teacher
     * @throws Exception
     */
    Map<String, Map<String, String>> timetables(TeacherInfo teacher)throws Exception;
}
